/*******************************************************************************
 * Copyright (c) 2012, G. Weirich and Elexis
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *    G. Weirich - initial implementation
 *******************************************************************************/

package ch.elexis.easy.ui;


import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;

import ch.elexis.core.data.IActionDefinition;
import ch.elexis.easy.handlers.SearchPatient;
import ch.elexis.easy.ui.widgets.InputButtonField;

/**
 * The MainPanel is displayed if no component is active. 
 * @author gerry
 *
 */
public class MainPanel extends Composite {
	public MainPanel(Composite parent){
		super(parent,SWT.NONE);
		setLayout(new GridLayout());
		InputButtonField ibf=new InputButtonField(this, "Select Patient", "Search", (IActionDefinition) new SearchPatient());
		GridData gd=new GridData(SWT.FILL,SWT.FILL,true,false);
		//GridDataFactory.fillDefaults().applyTo(ibf);
		ibf.setLayoutData(gd);
		//ibf.setBackground(Display.getDefault().getSystemColor(SWT.COLOR_BLUE));
		//setBackground(Display.getDefault().getSystemColor(SWT.COLOR_GREEN));
		PatientDetailPanel pdp=new PatientDetailPanel(this);
		pdp.setLayoutData(new GridData(GridData.FILL,GridData.FILL,true,false));
	}
}
